<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>全局变量与函数 | Inner Core 0.1 文档</title>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
  <link rel="stylesheet" href="assets/style.css">
  <link rel="stylesheet" href="assets/sh.css">
  <link rel="canonical" href="https://nodejs.org/api/Globals.html">
</head>
<body class="alt apidoc" id="api-section-Globals">
  <div id="content" class="clearfix">
    <div id="column2" class="interior">
      <div id="intro" class="interior">
        <a href="/" title="返回首页">
          Inner Core
        </a>
      </div>
      <ul>
<li><a class="nav-http-www-w3school-com-cn-js-pro_js_syntax-asp" href="http://www.w3school.com.cn/js/pro_js_syntax.asp">W3CSchool - ECMAScript教程</a></li>
<li><a class="nav-http-es6-ruanyifeng-com-README" href="http://es6.ruanyifeng.com/#README">阮一峰 - ECMAScript教程</a></li>
</ul>
<div class="line"></div>

<ul>
<li><a class="nav-Globals active" href="Globals.html">Globals - 一般全局函数</a></li>
<li><a class="nav-FileTools" href="FileTools.html">Files - 文件系统</a></li>
<li><p><a class="nav-Debug" href="Debug.html">Debug - 调试</a></p>
</li>
<li><p><a class="nav-https-developer-mozilla-org-zh-CN-docs-Mozilla-Projects-Rhino-Scripting_Java" href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Projects/Rhino/Scripting_Java">Work with Java - 调用Java API</a></p>
</li>
</ul>
<div class="line"></div>

<ul>
<li><a class="nav-https-gitee-com-dazeyoooo-ICore-Docs" href="https://gitee.com/dazeyoooo/ICore-Docs">Gitee项目 &amp; Issue提交</a></li>
</ul>

    </div>

    <div id="column1" data-id="Globals" class="interior">
      <header>
        <h1>Inner Core 0.1 文档</h1>
        <div id="gtoc">
          <p>
            <a href="index.html" name="toc">索引</a> |
            <a href="all.html">查看全部</a>
          </p>
        </div>
        <hr>
      </header>

      <div id="toc">
        <h2>目录</h2>
        <ul>
<li><span class="stability_2"><a href="#globals">全局变量与函数</a></span><ul>
<li><span class="stability_undefined"><a href="#globals_getcoreapilevel">getCoreAPILevel()</a></span></li>
<li><span class="stability_undefined"><a href="#globals_runonmainthread_fun">runOnMainThread(fun)</a></span></li>
<li><span class="stability_undefined"><a href="#globals_getmcpeversion">getMCPEVersion()</a></span></li>
<li><span class="stability_undefined"><a href="#globals_texture_path">Texture(path)</a></span></li>
<li><span class="stability_undefined"><a href="#globals_modelapi_parentmodel">ModelAPI(parentModel)</a></span></li>
<li><span class="stability_undefined"><a href="#globals_modelwatcher_entity_model">ModelWatcher(entity, model)</a></span></li>
</ul>
</li>
</ul>

      </div>

      <div id="apicontent">
        <h1>全局变量与函数<span><a class="mark" href="#globals" id="globals">#</a></span></h1>
<div class="api_stability api_stability_2"><a href="documentation.html#documentation_stability_index">Stability: 2</a> - 全局变量和函数在所有模块中均可使用。</div><h2>getCoreAPILevel()<span><a class="mark" href="#globals_getcoreapilevel" id="globals_getcoreapilevel">#</a></span></h2>
<div class="signature"><ul>
<li>返回 <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type">&lt;number&gt;</a></li>
</ul>
</div><p>获取CoreAPI的级别</p>
<h2>runOnMainThread(fun)<span><a class="mark" href="#globals_runonmainthread_fun" id="globals_runonmainthread_fun">#</a></span></h2>
<div class="signature"><ul>
<li>fun <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a> 需要执行的函数</li>
</ul>
</div><p>在主线程执行某函数</p>
<h2>getMCPEVersion()<span><a class="mark" href="#globals_getmcpeversion" id="globals_getmcpeversion">#</a></span></h2>
<div class="signature"><ul>
<li>返回 <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type">&lt;number&gt;</a></li>
</ul>
</div><p>获取游戏版本</p>
<h2>Texture(path)<span><a class="mark" href="#globals_texture_path" id="globals_texture_path">#</a></span></h2>
<h2>ModelAPI(parentModel)<span><a class="mark" href="#globals_modelapi_parentmodel" id="globals_modelapi_parentmodel">#</a></span></h2>
<h2>ModelWatcher(entity, model)<span><a class="mark" href="#globals_modelwatcher_entity_model" id="globals_modelwatcher_entity_model">#</a></span></h2>

      </div>
    </div>
  </div>
  <script src="assets/sh_main.js"></script>
  <script src="assets/sh_javascript.min.js"></script>
  <script>highlight(undefined, undefined, 'pre');</script>
  <!-- __TRACKING__ -->
</body>
</html>